Skip to content

[Merged by Bors] - chore(LinearAlgebra/Matrix/Nondegenerate): generalize lemmas to CommSemiring#41271

Closed
kim-em wants to merge 1 commit into
masterfrom
claude/nondegenerate-commsemiring
Closed

[Merged by Bors] - chore(LinearAlgebra/Matrix/Nondegenerate): generalize lemmas to CommSemiring#41271
kim-em wants to merge 1 commit into
masterfrom
claude/nondegenerate-commsemiring

Conversation

@kim-em

@kim-em kim-em commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This PR generalizes the SeparatingLeft/SeparatingRight/Nondegenerate lemmas from CommRing to CommSemiring (the determinant section keeps CommRing), and golfs nondegenerate_def using the @[mk_iff]-generated nondegenerate_iff. Follow-up to #39634, which generalized the definitions but left the lemmas at CommRing.

🤖 Prepared with Claude Code

…emiring

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR summary b22d8c0b1b

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit b22d8c0).

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit b22d8c0b1b
Reference commit 88d006abbc

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@kim-em

kim-em commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

!bench

@leanprover-radar

leanprover-radar commented Jul 2, 2026

Copy link
Copy Markdown

Benchmark results for b22d8c0 against 88d006a are in. No significant results found. @kim-em

  • 🟥 build//instructions: +18.1G (+0.01%)

No significant changes detected.

@kim-em kim-em added the LLM-generated PRs with substantial input from LLMs - review accordingly label Jul 2, 2026

@SnirBroshi SnirBroshi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the list of PRs it looks like you've had an LLM look at the most recent commits and try to improve upon them, very cool!

Although I believe many lemmas here or in ToLinearEquiv.lean can be trivially generalized further than CommSemiring, since the defs take a NonUnitalNonAssocSemiring.
Could you automate generalizing further?

@kim-em
kim-em marked this pull request as draft July 2, 2026 05:04
@mathlib-bors

mathlib-bors Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@YaelDillies YaelDillies left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚀

maintainer merge

@YaelDillies
YaelDillies marked this pull request as ready for review July 2, 2026 07:27
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jul 2, 2026

@ocfnash ocfnash left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 2, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jul 2, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 2, 2026
…emiring (#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to #39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 2, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title chore(LinearAlgebra/Matrix/Nondegenerate): generalize lemmas to CommSemiring [Merged by Bors] - chore(LinearAlgebra/Matrix/Nondegenerate): generalize lemmas to CommSemiring Jul 2, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 2, 2026
@mathlib-bors
mathlib-bors Bot deleted the claude/nondegenerate-commsemiring branch July 2, 2026 16:39
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Jul 4, 2026
…emiring (leanprover-community#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to leanprover-community#39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…emiring (leanprover-community#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to leanprover-community#39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. LLM-generated PRs with substantial input from LLMs - review accordingly ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants